{ "nodes": [ { "datums": [ { "expr": "0", "name": "x0", "type": "float", "uid": 0 }, { "expr": "0", "name": "y0", "type": "float", "uid": 1 }, { "expr": "0.7", "name": "width", "type": "float", "uid": 2 }, { "expr": "1.6", "name": "height", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('aa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8',float('-0.350000'),float('-0.800000'),float('-inf'),float('0.350000'),float('0.800000'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -243, -151 ], "name": "r0", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/15", "", "import fab", "", "title('Rectangle (center)')", "", "input('x0', float)", "input('y0', float)", "input('width', float)", "input('height', float)", "", "xmin, xmax = x0 - width/2, x0 + width/2", "ymin, ymax = y0 - height/2, y0 + height/2", "", "output('shape', fab.shapes.rectangle(xmin, xmax, ymin, ymax))", "", "def drag_hw(this, x, y, z):", " this.width = abs(2 * (x - this.x0))", " this.height = abs(2 * (y - this.y0))", "", "# UI", "sb.ui.wireframe(", " [(xmin, ymin, 0), (xmax, ymin, 0), (xmax, ymax, 0), (xmin, ymax, 0)],", " close=True)", "sb.ui.point(x0, y0)", "sb.ui.point(xmax, ymax, drag=drag_hw, relative=False)", "" ], "uid": 0 }, { "datums": [ { "expr": "1.5", "name": "x0", "type": "float", "uid": 0 }, { "expr": "0", "name": "y0", "type": "float", "uid": 1 }, { "expr": "0.7", "name": "width", "type": "float", "uid": 2 }, { "expr": "1.6", "name": "height", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8',float('1.150000'),float('-0.800000'),float('-inf'),float('1.850000'),float('0.800000'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -246.5372526032334, 35.61175780970023 ], "name": "r1", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/15", "", "import fab", "", "title('Rectangle (center)')", "", "input('x0', float)", "input('y0', float)", "input('width', float)", "input('height', float)", "", "xmin, xmax = x0 - width/2, x0 + width/2", "ymin, ymax = y0 - height/2, y0 + height/2", "", "output('shape', fab.shapes.rectangle(xmin, xmax, ymin, ymax))", "", "def drag_hw(this, x, y, z):", " this.width = abs(2 * (x - this.x0))", " this.height = abs(2 * (y - this.y0))", "", "# UI", "sb.ui.wireframe(", " [(xmin, ymin, 0), (xmax, ymin, 0), (xmax, ymax, 0), (xmin, ymax, 0)],", " close=True)", "sb.ui.point(x0, y0)", "sb.ui.point(xmax, ymax, drag=drag_hw, relative=False)", "" ], "uid": 1 }, { "datums": [ { "expr": "0.75", "name": "x0", "type": "float", "uid": 0 }, { "expr": "0", "name": "y0", "type": "float", "uid": 1 }, { "expr": "0.89", "name": "r", "type": "float", "uid": 2 }, { "expr": "0", "name": "_a", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('-r+q-Xf0.75qYf0.89',float('-0.140000'),float('-0.890000'),float('-inf'),float('1.640000'),float('0.890000'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -253.4228981206599, 243.5370479593684 ], "name": "c0", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/18", "", "import fab", "import math", "", "title('Circle (center)')", "", "input('x0',float)", "input('y0',float)", "input('r',float)", "input('_a',float)", "", "output('shape', fab.shapes.circle(x0, y0, r))", "", "def drag_r(this,x,y,z):", " dx = x - this.x0", " dy = y - this.y0", " this.r = math.sqrt(dx**2 + dy**2)", " this._a = math.atan2(dy, dx)", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x0,", " math.sin(i/36. * 2*math.pi) * r + y0, 0)", " for i in range(36)], close=True)", "sb.ui.point(x0,y0)", "sb.ui.point(x0 + r*math.cos(_a),", " y0 + r*math.sin(_a),", " drag=drag_r, relative=False)", "", "" ], "uid": 2 }, { "datums": [ { "expr": "0.75", "name": "x", "type": "float", "uid": 0 }, { "expr": "0.0", "name": "y", "type": "float", "uid": 1 }, { "expr": "0.0", "name": "z", "type": "float", "uid": 2 }, { "expr": "0.8", "name": "r", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('-r++q-Xf0.75qYqZf0.8',float('-0.050000'),float('-0.800000'),float('-0.800000'),float('1.550000'),float('0.800000'),float('0.800000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ 197.11379560138107, 171.26280601431466 ], "name": "s0", "script": [ "import fab", "import math", "", "title('Sphere (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('r', float)", "", "output('shape', fab.shapes.sphere(x, y, z, r))", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, z)", " for i in range(36)], close=True)", "sb.ui.wireframe([(x,y,z-r), (x,y,z+r)])", "", "sb.ui.point(x, y, z)", "sb.ui.point(x, y, z + r, drag=(None, None, r))", "sb.ui.point(x, y, z - r, drag=(None, None, r))", "" ], "uid": 3 }, { "datums": [ { "expr": "\u0011[__0.__4,__1.__4]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__2.__4]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('aiaa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8n-r+q-Xf0.75qYf0.89',float('-0.350000'),float('-0.800000'),float('-inf'),float('1.850000'),float('0.800000'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 206.80791669653095, -98.55689780069054 ], "name": "d0", "script": [ "import fab.types", "", "title('Difference')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a & ~b)", "" ], "uid": 4 }, { "datums": [ { "expr": "\u0011[__4.__2]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "5", "name": "x", "type": "float", "uid": 1 }, { "expr": "\u0012fab.types.Shape('m-Xf5-Yf0-Zf0imr+qXqZ__m-Xf-5-Yf0-Zf0aiaa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8n-r+q-Xf0.75qYf0.89mnr+qXqZ__m-Xf-5-Yf0-Zf0aiaa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8n-r+q-Xf0.75qYf0.89',float('-0.350000'),float('-0.800000'),float('-5.350000'),float('10.350000'),float('0.800000'),float('5.350000'))", "name": "out", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 625.1566377825669, -69.46184864250743 ], "name": "r2", "script": [ "# Neil Gershenfeld 2/1/15", "# Matt Keeter 6/13/15", "", "import fab", "", "title('Revolve (Y)')", "", "input('a', fab.types.Shape)", "input('x', float)", "", "output('out', fab.shapes.revolve_xy_y(a, x))", "", "" ], "uid": 5 }, { "datums": [ { "expr": "\u0011[__3.__4]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "0", "name": "r", "type": "int", "uid": 1 }, { "expr": "255", "name": "g", "type": "int", "uid": 2 }, { "expr": "0", "name": "b", "type": "int", "uid": 3 }, { "expr": "\u0012fab.types.Shape('-r++q-Xf0.75qYqZf0.8',float('-0.050000'),float('-0.800000'),float('-0.800000'),float('1.550000'),float('0.800000'),float('0.800000'),color=(0,255,0))", "name": "out", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ 507.30735005466545, 167.66937840789785 ], "name": "s1", "script": [ "import fab", "import math", "", "title('Set color (RGB)')", "", "input(\"shape\", fab.types.Shape)", "input(\"r\", int)", "input(\"g\", int)", "input(\"b\", int)", "", "output(\"out\", fab.shapes.set_color(shape, r, g, b))", "" ], "uid": 6 }, { "datums": [ { "expr": "\u0011[__6.__4]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "5", "name": "x", "type": "float", "uid": 1 }, { "expr": "0.0", "name": "y", "type": "float", "uid": 2 }, { "expr": "16", "name": "n", "type": "int", "uid": 3 }, { "expr": "\u0012fab.types.Shape('iiiiiiiiiiiiiiim-Xf5-Yf0-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f0.382683Y+*f-0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f0.707107Y+*f-0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f0.92388Y+*f-0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f0.92388Y+*f-0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f0.707107Y+*f-0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f0.382683Y+*f-0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f-0.382683Y+*f0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f-0.707107Y+*f0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f-0.92388Y+*f0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f-0.92388Y+*f0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f-0.707107Y+*f0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f-0.382683Y+*f0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8',float('-0.050000'),float('-5.050000'),float('-0.800000'),float('10.050000'),float('5.050000'),float('0.800000'),color=(0,255,0))", "name": "array", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ 844.0791784807861, 174.83473645951767 ], "name": "a0", "script": [ "import fab", "import math", "", "title('Array (polar)')", "", "input('shape', fab.types.Shape)", "input('x', float)", "input('y', float)", "input('n', int)", "", "output('array', fab.shapes.iterate_polar(shape, x, y, n))", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * 0.3 + x,", " math.sin(i/36. * 2*math.pi) * 0.3 + y, 0)", " for i in range(36)], close=True, color=sb.color.teal)", "", "sb.ui.point(x, y, 0, color=sb.color.teal)", "" ], "uid": 7 }, { "datums": [ { "expr": "0.0", "name": "_x", "type": "float", "uid": 0 }, { "expr": "0.0", "name": "y", "type": "float", "uid": 1 }, { "expr": "0.0", "name": "z", "type": "float", "uid": 2 }, { "expr": "90", "name": "a", "type": "float", "uid": 3 }, { "expr": "\u0011[__7.__4]", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 }, { "expr": "\u0012fab.types.Shape('m-Xf0-Yf0-Zf0m_+*f6.12323e-17Y*f1Z+*f-1Y*f6.12323e-17Zm-Xf0-Yf-0-Zf-0iiiiiiiiiiiiiiim-Xf5-Yf0-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f0.382683Y+*f-0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f0.707107Y+*f-0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f0.92388Y+*f-0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f0.92388Y+*f-0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f0.707107Y+*f-0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f0.382683Y+*f-0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f-0.382683Y+*f0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f-0.707107Y+*f0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f-0.92388Y+*f0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f-0.92388Y+*f0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f-0.707107Y+*f0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f-0.382683Y+*f0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8',float('-0.050000'),float('-0.800000'),float('-5.050000'),float('10.050000'),float('0.800000'),float('5.050000'),color=(0,255,0))", "name": "rotated", "type": "_fabtypes.Shape", "uid": 5 } ], "inspector": [ 1148.630835423317, 172.07288190897566 ], "name": "r3", "script": [ "import fab", "import math", "", "title('Rotate (X)')", "", "input('_x', float)", "input('y', float)", "input('z', float)", "input('a', float)", "", "input('shape', fab.types.Shape)", "output('rotated', fab.shapes.rotate_x(shape, a, y, z))", "", "# UI", "rad = math.radians(a)", "sb.ui.wireframe([(_x, y + math.cos(rad), z + math.sin(rad)),", " (_x, y, z),", " (_x, y + 1, z)], color=sb.color.teal)", "", "# Draw a semi-circular arc showing the rotation", "if int(a) % 360 != 0:", " sb.ui.wireframe([", " (_x, y + math.cos(math.radians(a_)) * 0.3,", " z + math.sin(math.radians(a_)) * 0.3)", " for a_ in range(int(a) % 360)], color=sb.color.teal)", "", "sb.ui.point(_x, y, z, color=sb.color.teal)", "", "def drag_pt(this, x, y, z):", " this.a = math.degrees(math.atan2(z - this.z, y - this.y))", "sb.ui.point(_x, y + math.cos(rad), z + math.sin(rad),", " color=sb.color.teal, drag=drag_pt, relative=False)", "", "" ], "uid": 8 }, { "datums": [ { "expr": "\u0011[__8.__5,__5.__2]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0012fab.types.Shape('im-Xf0-Yf0-Zf0m_+*f6.12323e-17Y*f1Z+*f-1Y*f6.12323e-17Zm-Xf0-Yf-0-Zf-0iiiiiiiiiiiiiiim-Xf5-Yf0-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f0.382683Y+*f-0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f0.707107Y+*f-0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f0.92388Y+*f-0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f0.92388Y+*f-0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f0.707107Y+*f-0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f0.382683Y+*f-0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.92388X*f-0.382683Y+*f0.382683X*f-0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.707107X*f-0.707107Y+*f0.707107X*f-0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-0.382683X*f-0.92388Y+*f0.92388X*f-0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.382683X*f-0.92388Y+*f0.92388X*f0.382683Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.707107X*f-0.707107Y+*f0.707107X*f0.707107Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0m+*f0.92388X*f-0.382683Y+*f0.382683X*f0.92388Y_m-Xf-5-Yf-0-Zf0-r++q-Xf0.75qYqZf0.8m-Xf5-Yf0-Zf0imr+qXqZ__m-Xf-5-Yf0-Zf0aiaa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8n-r+q-Xf0.75qYf0.89mnr+qXqZ__m-Xf-5-Yf0-Zf0aiaa-f-0.35X-Xf0.35a-f-0.8Y-Yf0.8aa-f1.15X-Xf1.85a-f-0.8Y-Yf0.8n-r+q-Xf0.75qYf0.89',float('-0.350000'),float('-0.800000'),float('-5.350000'),float('10.350000'),float('0.800000'),float('5.350000'))", "name": "out", "type": "_fabtypes.Shape", "uid": 1 } ], "inspector": [ 1630.4723652940531, 144.2114546920733 ], "name": "m0", "script": [ "import fab", "", "title('Mesh (.stl)')", "", "input('shape', fab.types.Shape)", "output('out', shape)", "", "sb.export.stl(shape)", "" ], "uid": 9 } ], "protocol": 6, "type": "sb" }